home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.7 KB | 49 lines | [TEXT/GEOL] |
-
- Sorry about interjecting a technical thought in the midst of a legalese
- barrage, but here is a reply to replies to my question.
-
- Thanks for replies to my previous question about having multiple TEViews nested
- inside a CatView. I decided to use a variation on the idea that Larry
- Rosenstein proposed. I kept the idea of really only having one TEView which
- heartily speeded several operations. The only involved part was switching from
- the current TEView location to the new location. Notes on the implementation:
-
-
- I keep a list of rectangles where my TEViews can be.
- On a mouse down in my CatView I determine the TEView rectangle index.
-
- IF i <> gCurrBoxNum THEN {If Rectangle Index <> Current
- Index}
- BEGIN
- TEDeactivate(gExptDocument.fTEView.fHTE); {Deactivate the TEView for
- update purposes}
- gCurrBoxNum := i; {Assign Current Index}
-
- {Copy the TE text to a storage list through a global variable}
- GetIText(gExptDocument.fTEView.fHTE^^.hText, MyString);
- gCurrIOBox.fTitle := MyString;
-
- {Set the TE text to the string of the new text area}
- TESetText(@aIOBox.fTitle[1], Length(aIOBox.fTitle),
- gExptDocument.fTEView.fHTE);
-
- r := aIOBox.flocation; {Change the extent rect of
- TE View}
- gExptDocument.fTEView.SetExtent(r);
-
- ValidRect(gExptDocument.fExptView.fExtentRect); {Avoid uneeded flicker}
- gCurrIOBox := aIOBox; {Assign global variable}
- TEActivate(gExptDocument.fTEView.fHTE); {Reactivate the TE}
- END;
-
-
- You need to remember to draw the current TE View in the .Draw routine
- separately to ensure it is up to date, and to save the current TE View upon a
- Save command.
-
- Keith Bossert
- Software Development Group
- Drexel University
-
-
-